Cannot perform cascading operation on table <name> because it is currently in use by user <name> on machine <name>. (Error 3413)

This error occurs when referential integrity is defined with one of the following actions: CASCADE DELETE, UPDATE or NULL. The error occurs when making a change to a table that contains a referenced primary key and one or more of the foreign key tables is opened in a mode that prevents the foreign key tables from being opened in a shared read/write mode.